<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <title>属性选择器</title>
        <style type="text/css">
            /* class selector */
            .wrapper { border: 1px solid blue ;  }
            /* attribute selector */
            [type] { border: 1px solid red ;  }
            [name] { background-color: #FFFF00 ; }
            [value] { background-color: #dedede ; }
        </style>
    </head>
    <body>

        <form action="http://www.baidu.com/s" target="_blank">
            <div class="wrapper">
                <input type="text" name="wd">
                <input type="submit" value="百度一下">
            </div>
        </form>

    </body>
</html>